import request from '@/router/axios';

export const getSmsRecordsList = ( params) => {
  return request({
    url: '/api/smsrecords/list',
    method: 'get',
    params: {
      params
    }
  })
}

export const getSmsRecordsPage = (current, size,params) => {
  return request({
    url: '/api/smsrecords/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}


export const getDataByMonth = () => {
  return request({
    url: '/api/smsrecords/getDataByMonth',
    method: 'get',
    params: {}
  })
}

export const getSmsRecordsDetail = (id) => {
  return request({
    url: '/api/smsrecords/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const removeSmsRecords = (ids) => {
  return request({
    url: '/api/smsrecords/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const addSmsRecords = (row) => {
  return request({
    url: '/api/smsrecords/submit',
    method: 'post',
    data: row
  })
}

export const updateSmsRecords = (row) => {
  return request({
    url: '/api/smsrecords/submit',
    method: 'post',
    data: row
  })
}

